#include "lgPowerDet.h"

void lgInitPowerDetect()
{
   GPIO_PinInit(AC_DET_PIN, GPIO_PinInput);
}


POWER_TYPE_T   sys_power_type()
{
     POWER_TYPE_T  powerType = POWER_UNKNOW;
   
    unsigned  char  nRes = 0;
    nRes = AC_DET_IN;
    if(nRes > 0)
    {
       powerType = POWER_DC_24V  ;
    }
    else
    {
       powerType = POWER_AC_220V;
    }
   return    powerType; 
  
  
}